<?php
date_default_timezone_set('PRC');
session_start();
include('inc/config.php');
include('inc/MysqlDao.php');
include('inc/classes/Word.php');
MysqlDao::conn();
if (empty($_GET['export']) || empty($_GET['id'])) {
  if(intval($_GET['type']) == 0){ 
  	//工作报告导出
  	$list = MysqlDao::exportSummaryData(intval($_GET['export'])) ;
    $recordTime = MysqlDao::maxSummaryDate();
  	$typeName = 0;	
  	$file = date('Y-m-d').".doc";
  	 new Word($list , $file ,$typeName ,$recordTime );
  }elseif(intval($_GET['type']) == 1){  	
  	//业务跟进导出
     $list = MysqlDao::exportProjectReply(intval($_GET['id']));
	 $typeName  = 1;
	 $file = date('Y-m-d').".doc";	  
	 new Word($list , $file ,$typeName ,$_GET['title']);
  } 
} 

?>
